home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Herois
/
Codigo.Cst
/
00001_Script_Inicio e Fim
next >
Wrap
Text File
|
1999-03-19
|
4KB
|
159 lines
on startMovie
global myMemSize, eMac
set myMemSize = the memorySize
-- set myMemSize = 8192
if the platform contains "Mac" then
set eMac = true
else
set eMac = false
end if
-- Variaveis de plataforma
global gSepPath
if the platform contains "Mac" then
set gSepPath = ":"
else
set gSepPath = "\"
end if
-- Garante que arquivos estao fechados
fechaDB
fechaTextosDB
-- Abre banco de dados
global gDB, gPals, gRefs, gArqs
global V12dbeFact, V12tblFact
-- Tirar comentario para fazer executavel de importacao
-- ImportaDB
-- ImportaTextosDB
-- quit
--
set V12dbeFact = Xtra "V12dbe"
set V12tblFact = Xtra "V12table"
abreDB
-- put "Palavras: " & mSelectCount(gPals)
-- put "Textos: " & mSelectCount(gArqs)
-- put "Referencias: " & mSelectCount(gRefs)
abreTextosDB
-- put "Links: " & mSelectCount(gLinks)
-- put "Textos normais: " & mSelectCount(gSimples)
-- put "Textos verbetes: " & mSelectCount(gVerbetes)
utilInicializa
-- Algumas globais
global gCritico
set gCritico = 0 -- Se esta numa interacao critica, ie, rapida
global gVerbeteUltimo
set gVerbeteUltimo = 11062
global gAstros, gAstroAtual
set gAstros = 11004
set gAstroAtual = gAstros -- Ultimo astro aberto
global gEquipes, gEquipeAtual
set gEquipes = 10937 -- Primeiro verbete das equipes
set gEquipeAtual = gEquipes
global gHerois, gHeroiAtual
set gHerois = 10000 -- Primeiro verbete dos herois
set gHeroiAtual = gHerois
global gVerbeteAtual
set gVerbeteAtual = gHeroiAtual
global gTabelaCriadores
set gTabelaCriadores = [ 32, 5, 9, 10, 27, 16, 17, 12,¼
37,29,4,23,26,39,25,2,8,19,20,1,6,33,15,13,31,18,¼
28,36,11,38,14,30,35,22,3,21,24,34,7,40 ]
MelhoresEmbaralha
-- Sons
global gFundoTempo
set gFundoTempo = the timer
-- Tabela de "Step Back"
global gStepBack, gStepBackMax, gStepBackIni, gStepBackUlt
set gStepBackMax = 100
set gStepBackIni = 1
set gStepBackUlt = 1
set gStepBack = []
repeat with i = 1 to gStepBackMax
add gStepBack, 0
end repeat
-- De onde vem o ultimo frame
global gDonde -- abertura(0), universos(1), momentos(1000), criadores(2000), verbetes(10000)
set gDonde = -1
-- Posicao do texto na pagina do Jurassic
global gJurassicScroll
set gJurassicScroll = 224
-- Lista de paginas selecionadas
global gPagSel, gPagArraste
set gPagSel = []
set gPagArraste = 0
-- Processa teclado
set the keyDownScript = "cuidaTeclado"
-- Teclado
global gTeclado
set gTeclado = 0
end
on stopMovie
fechaDB
fechaTextosDB
global V12dbeFact, V12tblFact
set V12dbeFact = 0
set V12tblFact = 0
end
on cuidaTeclado
if the frame < marker("Universo") or the frame > marker("Fim") then
pass
else
global gTeclado
set k = charToNum(the key)
-- PageUp
if k = 11 then
fazBack
return
-- TAB
else if k = 9 then
sendSprite 97, #chaveVisibilidade, (not the ligado of sprite 97)
return
-- F1 ou "1" durante edicao
else if (k = 16) then
sendSprite 110, #abreFecha
return
-- Testa teclas do "Easter Egg"
else if (the key = "g") then
set gTeclado = 1
else if (gTeclado = 1 and the key = "n") then
set gTeclado = 2
else if (gTeclado = 2 and the key = "u") then
sendAllSprites(#cleanSprite)
go frame "nois"
else
set gTeclado = 0
pass
end if
end if
end